<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.socket</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.socket";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.socket.html" class="symbol">std.socket</a></h1>
  
<p class="sec_header">Notes:</p>For Win32 systems, link with ws2_32.lib.
<p class="sec_header">Example:</p>See /dmd/samples/d/listener.d.
<p class="sec_header">Authors:</p>Christopher E. Miller
<dl>
<dt class="decl">alias std.c.linux.linux.timeval <a class="symbol _alias" name="_ctimeval" href="./htmlsrc/std.socket.html#L69" kind="alias" beg="69" end="69">_ctimeval</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#_ctimeval" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L69">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">typedef int32_t <a class="symbol _typedef" name="socket_t" href="./htmlsrc/std.socket.html#L72" kind="typedef" beg="72" end="72">socket_t</a>; <a title="Permalink to this symbol" href="#socket_t" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L72">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _variable" name="_SOCKET_ERROR" href="./htmlsrc/std.socket.html#L73" kind="variable" beg="73" end="73">_SOCKET_ERROR</a>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#_SOCKET_ERROR" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L73">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="_lasterr" href="./htmlsrc/std.socket.html#L76" kind="function" beg="76" end="79">_lasterr</a><span class="params">()</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#_lasterr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L76">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="SocketException" href="./htmlsrc/std.socket.html#L88" kind="class" beg="88" end="114">SocketException</a> : Exception; <a title="Permalink to this symbol" href="#SocketException" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L88">#</a></dt>
<dd class="ddef">
<div class="summary">Base exception thrown from a Socket.</div>
<dl>
<dt class="decl">int <a class="symbol _variable" name="SocketException.errorCode" href="./htmlsrc/std.socket.html#L90" kind="variable" beg="90" end="90">errorCode</a>; <a title="Permalink to this symbol" href="#SocketException.errorCode" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L90">#</a></dt>
<dd class="ddef">
<div class="summary">Platform-specific error code.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="SocketException.this" href="./htmlsrc/std.socket.html#L92" kind="ctor" beg="92" end="113">this</a><span class="params">(string <em>msg</em>, int <em>err</em> = 0)</span>; <a title="Permalink to this symbol" href="#SocketException.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L92">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">static <a class="symbol _sctor" name="this" href="./htmlsrc/std.socket.html#L117" kind="sctor" beg="117" end="130">this</a>(); <a title="Permalink to this symbol" href="#this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L117">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">static <a class="symbol _sdtor" name="~this" href="./htmlsrc/std.socket.html#L133" kind="sdtor" beg="133" end="139">~this</a>(); <a title="Permalink to this symbol" href="#~this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L133">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">enum <a class="symbol _enum" name="AddressFamily" href="./htmlsrc/std.socket.html#L144" kind="enum" beg="144" end="152">AddressFamily</a>; <a title="Permalink to this symbol" href="#AddressFamily" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L144">#</a></dt>
<dd class="ddef">
<div class="summary">The communication domain used to resolve an address.</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.UNSPEC" href="./htmlsrc/std.socket.html#L146" kind="enummem" beg="146" end="146">UNSPEC</a> <a title="Permalink to this symbol" href="#AddressFamily.UNSPEC" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L146">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.UNIX" href="./htmlsrc/std.socket.html#L147" kind="enummem" beg="147" end="147">UNIX</a> <a title="Permalink to this symbol" href="#AddressFamily.UNIX" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L147">#</a></dt>
<dd class="ddef">
<div class="summary">local communication</div></dd>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.INET" href="./htmlsrc/std.socket.html#L148" kind="enummem" beg="148" end="148">INET</a> <a title="Permalink to this symbol" href="#AddressFamily.INET" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L148">#</a></dt>
<dd class="ddef">
<div class="summary">internet protocol version 4</div></dd>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.IPX" href="./htmlsrc/std.socket.html#L149" kind="enummem" beg="149" end="149">IPX</a> <a title="Permalink to this symbol" href="#AddressFamily.IPX" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L149">#</a></dt>
<dd class="ddef">
<div class="summary">novell IPX</div></dd>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.APPLETALK" href="./htmlsrc/std.socket.html#L150" kind="enummem" beg="150" end="150">APPLETALK</a> <a title="Permalink to this symbol" href="#AddressFamily.APPLETALK" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L150">#</a></dt>
<dd class="ddef">
<div class="summary">appletalk</div></dd>
<dt class="decl"><a class="symbol _enummem" name="AddressFamily.INET6" href="./htmlsrc/std.socket.html#L151" kind="enummem" beg="151" end="151">INET6</a> <a title="Permalink to this symbol" href="#AddressFamily.INET6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L151">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="SocketType" href="./htmlsrc/std.socket.html#L158" kind="enum" beg="158" end="165">SocketType</a>; <a title="Permalink to this symbol" href="#SocketType" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L158">#</a></dt>
<dd class="ddef">
<div class="summary">Communication semantics</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="SocketType.STREAM" href="./htmlsrc/std.socket.html#L160" kind="enummem" beg="160" end="160">STREAM</a> <a title="Permalink to this symbol" href="#SocketType.STREAM" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L160">#</a></dt>
<dd class="ddef">
<div class="summary">sequenced, reliable, two-way communication-based byte streams</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketType.DGRAM" href="./htmlsrc/std.socket.html#L161" kind="enummem" beg="161" end="161">DGRAM</a> <a title="Permalink to this symbol" href="#SocketType.DGRAM" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L161">#</a></dt>
<dd class="ddef">
<div class="summary">connectionless, unreliable datagrams with a fixed maximum length; data may be lost or arrive out of order</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketType.RAW" href="./htmlsrc/std.socket.html#L162" kind="enummem" beg="162" end="162">RAW</a> <a title="Permalink to this symbol" href="#SocketType.RAW" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L162">#</a></dt>
<dd class="ddef">
<div class="summary">raw protocol access</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketType.RDM" href="./htmlsrc/std.socket.html#L163" kind="enummem" beg="163" end="163">RDM</a> <a title="Permalink to this symbol" href="#SocketType.RDM" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L163">#</a></dt>
<dd class="ddef">
<div class="summary">reliably-delivered message datagrams</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketType.SEQPACKET" href="./htmlsrc/std.socket.html#L164" kind="enummem" beg="164" end="164">SEQPACKET</a> <a title="Permalink to this symbol" href="#SocketType.SEQPACKET" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L164">#</a></dt>
<dd class="ddef">
<div class="summary">sequenced, reliable, two-way connection-based datagrams with a fixed maximum length</div></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="ProtocolType" href="./htmlsrc/std.socket.html#L171" kind="enum" beg="171" end="182">ProtocolType</a>; <a title="Permalink to this symbol" href="#ProtocolType" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L171">#</a></dt>
<dd class="ddef">
<div class="summary">Protocol</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.IP" href="./htmlsrc/std.socket.html#L173" kind="enummem" beg="173" end="173">IP</a> <a title="Permalink to this symbol" href="#ProtocolType.IP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L173">#</a></dt>
<dd class="ddef">
<div class="summary">internet protocol version 4</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.ICMP" href="./htmlsrc/std.socket.html#L174" kind="enummem" beg="174" end="174">ICMP</a> <a title="Permalink to this symbol" href="#ProtocolType.ICMP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L174">#</a></dt>
<dd class="ddef">
<div class="summary">internet control message protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.IGMP" href="./htmlsrc/std.socket.html#L175" kind="enummem" beg="175" end="175">IGMP</a> <a title="Permalink to this symbol" href="#ProtocolType.IGMP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L175">#</a></dt>
<dd class="ddef">
<div class="summary">internet group management protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.GGP" href="./htmlsrc/std.socket.html#L176" kind="enummem" beg="176" end="176">GGP</a> <a title="Permalink to this symbol" href="#ProtocolType.GGP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L176">#</a></dt>
<dd class="ddef">
<div class="summary">gateway to gateway protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.TCP" href="./htmlsrc/std.socket.html#L177" kind="enummem" beg="177" end="177">TCP</a> <a title="Permalink to this symbol" href="#ProtocolType.TCP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L177">#</a></dt>
<dd class="ddef">
<div class="summary">transmission control protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.PUP" href="./htmlsrc/std.socket.html#L178" kind="enummem" beg="178" end="178">PUP</a> <a title="Permalink to this symbol" href="#ProtocolType.PUP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L178">#</a></dt>
<dd class="ddef">
<div class="summary">PARC universal packet protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.UDP" href="./htmlsrc/std.socket.html#L179" kind="enummem" beg="179" end="179">UDP</a> <a title="Permalink to this symbol" href="#ProtocolType.UDP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L179">#</a></dt>
<dd class="ddef">
<div class="summary">user datagram protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.IDP" href="./htmlsrc/std.socket.html#L180" kind="enummem" beg="180" end="180">IDP</a> <a title="Permalink to this symbol" href="#ProtocolType.IDP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L180">#</a></dt>
<dd class="ddef">
<div class="summary">Xerox NS protocol</div></dd>
<dt class="decl"><a class="symbol _enummem" name="ProtocolType.IPV6" href="./htmlsrc/std.socket.html#L181" kind="enummem" beg="181" end="181">IPV6</a> <a title="Permalink to this symbol" href="#ProtocolType.IPV6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L181">#</a></dt>
<dd class="ddef">
<div class="summary">internet protocol version 6</div></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="Protocol" href="./htmlsrc/std.socket.html#L188" kind="class" beg="188" end="244">Protocol</a>; <a title="Permalink to this symbol" href="#Protocol" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L188">#</a></dt>
<dd class="ddef">
<div class="summary">Protocol is a class for retrieving protocol information.</div>
<dl>
<dt class="decl">ProtocolType <a class="symbol _variable" name="Protocol.type" href="./htmlsrc/std.socket.html#L190" kind="variable" beg="190" end="190">type</a>; <a title="Permalink to this symbol" href="#Protocol.type" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L190">#</a></dt>
<dt class="decl">string <a class="symbol _variable" name="Protocol.name" href="./htmlsrc/std.socket.html#L191" kind="variable" beg="191" end="191">name</a>; <a title="Permalink to this symbol" href="#Protocol.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L191">#</a></dt>
<dt class="decl">string[] <a class="symbol _variable" name="Protocol.aliases" href="./htmlsrc/std.socket.html#L192" kind="variable" beg="192" end="192">aliases</a>; <a title="Permalink to this symbol" href="#Protocol.aliases" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L192">#</a></dt>
<dd class="ddef">
<div class="summary">These members are populated when one of the following functions are called without failure:</div></dd>
<dt class="decl">void <a class="symbol _function" name="Protocol.populate" href="./htmlsrc/std.socket.html#L195" kind="function" beg="195" end="219">populate</a><span class="params">(protoent* <em>proto</em>)</span>; <a title="Permalink to this symbol" href="#Protocol.populate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L195">#</a></dt>

<dt class="decl">bool <a class="symbol _function" name="Protocol.getProtocolByName" href="./htmlsrc/std.socket.html#L222" kind="function" beg="222" end="230">getProtocolByName</a><span class="params">(string <em>name</em>)</span>; <a title="Permalink to this symbol" href="#Protocol.getProtocolByName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L222">#</a></dt>
<dd class="ddef">
<div class="summary">Returns false on failure</div></dd>
<dt class="decl">bool <a class="symbol _function" name="Protocol.getProtocolByType" href="./htmlsrc/std.socket.html#L235" kind="function" beg="235" end="243">getProtocolByType</a><span class="params">(ProtocolType <em>type</em>)</span>; <a title="Permalink to this symbol" href="#Protocol.getProtocolByType" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L235">#</a></dt>
<dd class="ddef">
<div class="summary">Returns false on failure</div></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.socket.html#L247" kind="unittest" beg="247" end="256">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L247">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="Service" href="./htmlsrc/std.socket.html#L262" kind="class" beg="262" end="349">Service</a>; <a title="Permalink to this symbol" href="#Service" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L262">#</a></dt>
<dd class="ddef">
<div class="summary">Service is a class for retrieving service information.</div>
<dl>
<dt class="decl">string <a class="symbol _variable" name="Service.name" href="./htmlsrc/std.socket.html#L265" kind="variable" beg="265" end="265">name</a>; <a title="Permalink to this symbol" href="#Service.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L265">#</a></dt>
<dt class="decl">string[] <a class="symbol _variable" name="Service.aliases" href="./htmlsrc/std.socket.html#L266" kind="variable" beg="266" end="266">aliases</a>; <a title="Permalink to this symbol" href="#Service.aliases" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L266">#</a></dt>
<dt class="decl">ushort <a class="symbol _variable" name="Service.port" href="./htmlsrc/std.socket.html#L267" kind="variable" beg="267" end="267">port</a>; <a title="Permalink to this symbol" href="#Service.port" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L267">#</a></dt>
<dt class="decl">string <a class="symbol _variable" name="Service.protocolName" href="./htmlsrc/std.socket.html#L268" kind="variable" beg="268" end="268">protocolName</a>; <a title="Permalink to this symbol" href="#Service.protocolName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L268">#</a></dt>
<dd class="ddef">
<div class="summary">These members are populated when one of the following functions are called without failure:</div></dd>
<dt class="decl">void <a class="symbol _function" name="Service.populate" href="./htmlsrc/std.socket.html#L271" kind="function" beg="271" end="296">populate</a><span class="params">(servent* <em>serv</em>)</span>; <a title="Permalink to this symbol" href="#Service.populate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L271">#</a></dt>

<dt class="decl">bool <a class="symbol _function" name="Service.getServiceByName" href="./htmlsrc/std.socket.html#L302" kind="function" beg="302" end="310">getServiceByName</a><span class="params">(string <em>name</em>, string <em>protocolName</em>)</span>; <a title="Permalink to this symbol" href="#Service.getServiceByName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L302">#</a></dt>
<dt class="decl">bool <a class="symbol _function" name="Service.getServiceByName:2" href="./htmlsrc/std.socket.html#L315" kind="function" beg="315" end="323">getServiceByName</a><span class="params">(string <em>name</em>)</span>; <a title="Permalink to this symbol" href="#Service.getServiceByName:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L315">#</a></dt>
<dt class="decl">bool <a class="symbol _function" name="Service.getServiceByPort" href="./htmlsrc/std.socket.html#L327" kind="function" beg="327" end="335">getServiceByPort</a><span class="params">(ushort <em>port</em>, string <em>protocolName</em>)</span>; <a title="Permalink to this symbol" href="#Service.getServiceByPort" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L327">#</a></dt>
<dt class="decl">bool <a class="symbol _function" name="Service.getServiceByPort:2" href="./htmlsrc/std.socket.html#L340" kind="function" beg="340" end="348">getServiceByPort</a><span class="params">(ushort <em>port</em>)</span>; <a title="Permalink to this symbol" href="#Service.getServiceByPort:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L340">#</a></dt>
<dd class="ddef">
<div class="summary">If a protocol name is omitted, any protocol will be matched.</div>
<p class="sec_header">Returns:</p>false on failure.</dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:2" href="./htmlsrc/std.socket.html#L352" kind="unittest" beg="352" end="368">unittest</a>; <a title="Permalink to this symbol" href="#unittest:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L352">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="HostException" href="./htmlsrc/std.socket.html#L374" kind="class" beg="374" end="384">HostException</a> : Exception; <a title="Permalink to this symbol" href="#HostException" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L374">#</a></dt>
<dd class="ddef">
<div class="summary">Base exception thrown from an InternetHost.</div>
<dl>
<dt class="decl">int <a class="symbol _variable" name="HostException.errorCode" href="./htmlsrc/std.socket.html#L376" kind="variable" beg="376" end="376">errorCode</a>; <a title="Permalink to this symbol" href="#HostException.errorCode" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L376">#</a></dt>
<dd class="ddef">
<div class="summary">Platform-specific error code.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="HostException.this" href="./htmlsrc/std.socket.html#L379" kind="ctor" beg="379" end="383">this</a><span class="params">(string <em>msg</em>, int <em>err</em> = 0)</span>; <a title="Permalink to this symbol" href="#HostException.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L379">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="InternetHost" href="./htmlsrc/std.socket.html#L389" kind="class" beg="389" end="499">InternetHost</a>; <a title="Permalink to this symbol" href="#InternetHost" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L389">#</a></dt>
<dd class="ddef">
<div class="summary">InternetHost is a class for resolving IPv4 addresses.</div>
<dl>
<dt class="decl">string <a class="symbol _variable" name="InternetHost.name" href="./htmlsrc/std.socket.html#L392" kind="variable" beg="392" end="392">name</a>; <a title="Permalink to this symbol" href="#InternetHost.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L392">#</a></dt>
<dt class="decl">string[] <a class="symbol _variable" name="InternetHost.aliases" href="./htmlsrc/std.socket.html#L393" kind="variable" beg="393" end="393">aliases</a>; <a title="Permalink to this symbol" href="#InternetHost.aliases" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L393">#</a></dt>
<dt class="decl">uint32_t[] <a class="symbol _variable" name="InternetHost.addrList" href="./htmlsrc/std.socket.html#L394" kind="variable" beg="394" end="394">addrList</a>; <a title="Permalink to this symbol" href="#InternetHost.addrList" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L394">#</a></dt>
<dd class="ddef">
<div class="summary">These members are populated when one of the following functions are called without failure:</div></dd>
<dt class="decl">void <a class="symbol _function" name="InternetHost.validHostent" href="./htmlsrc/std.socket.html#L397" kind="function" beg="397" end="401">validHostent</a><span class="params">(hostent* <em>he</em>)</span>; <a title="Permalink to this symbol" href="#InternetHost.validHostent" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L397">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="InternetHost.populate" href="./htmlsrc/std.socket.html#L404" kind="function" beg="404" end="450">populate</a><span class="params">(hostent* <em>he</em>)</span>; <a title="Permalink to this symbol" href="#InternetHost.populate" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L404">#</a></dt>

<dt class="decl">bool <a class="symbol _function" name="InternetHost.getHostByName" href="./htmlsrc/std.socket.html#L455" kind="function" beg="455" end="464">getHostByName</a><span class="params">(string <em>name</em>)</span>; <a title="Permalink to this symbol" href="#InternetHost.getHostByName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L455">#</a></dt>
<dd class="ddef">
<div class="summary">Resolve host name. Returns false if unable to resolve.</div></dd>
<dt class="decl">bool <a class="symbol _function" name="InternetHost.getHostByAddr" href="./htmlsrc/std.socket.html#L470" kind="function" beg="470" end="480">getHostByAddr</a><span class="params">(uint <em>addr</em>)</span>; <a title="Permalink to this symbol" href="#InternetHost.getHostByAddr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L470">#</a></dt>
<dd class="ddef">
<div class="summary">Resolve IPv4 address number. Returns false if unable to resolve.</div></dd>
<dt class="decl">bool <a class="symbol _function" name="InternetHost.getHostByAddr:2" href="./htmlsrc/std.socket.html#L488" kind="function" beg="488" end="498">getHostByAddr</a><span class="params">(string <em>addr</em>)</span>; <a title="Permalink to this symbol" href="#InternetHost.getHostByAddr:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L488">#</a></dt>
<dd class="ddef">
<div class="summary">Same as previous, but addr is an IPv4 address string in the
 dotted-decimal form <i>a.b.c.d</i>.
 Returns false if unable to resolve.</div></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:3" href="./htmlsrc/std.socket.html#L502" kind="unittest" beg="502" end="523">unittest</a>; <a title="Permalink to this symbol" href="#unittest:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L502">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="AddressException" href="./htmlsrc/std.socket.html#L529" kind="class" beg="529" end="535">AddressException</a> : Exception; <a title="Permalink to this symbol" href="#AddressException" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L529">#</a></dt>
<dd class="ddef">
<div class="summary">Base exception thrown from an Address.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="AddressException.this" href="./htmlsrc/std.socket.html#L531" kind="ctor" beg="531" end="534">this</a><span class="params">(string <em>msg</em>)</span>; <a title="Permalink to this symbol" href="#AddressException.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L531">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="Address" href="./htmlsrc/std.socket.html#L541" kind="class" beg="541" end="547">Address</a>; <span class="attrs">[<span class="stc">abstract</span>]</span> <a title="Permalink to this symbol" href="#Address" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L541">#</a></dt>
<dd class="ddef">
<div class="summary">Address is an abstract class for representing a network addresses.</div>
<dl>
<dt class="decl">sockaddr* <a class="symbol _function" name="Address.name" href="./htmlsrc/std.socket.html#L543" kind="function" beg="543" end="543">name</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#Address.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L543">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="Address.nameLen" href="./htmlsrc/std.socket.html#L544" kind="function" beg="544" end="544">nameLen</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#Address.nameLen" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L544">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">AddressFamily <a class="symbol _function" name="Address.addressFamily" href="./htmlsrc/std.socket.html#L545" kind="function" beg="545" end="545">addressFamily</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Address.addressFamily" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L545">#</a></dt>
<dd class="ddef">
<div class="summary">Family of this address.</div></dd>
<dt class="decl">string <a class="symbol _function" name="Address.toString" href="./htmlsrc/std.socket.html#L546" kind="function" beg="546" end="546">toString</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#Address.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L546">#</a></dt>
<dd class="ddef">
<div class="summary">Human readable string representing this address.</div></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="UnknownAddress" href="./htmlsrc/std.socket.html#L552" kind="class" beg="552" end="581">UnknownAddress</a> : Address; <a title="Permalink to this symbol" href="#UnknownAddress" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L552">#</a></dt>
<dd class="ddef">
<div class="summary"></div>
<dl>
<dt class="decl">sockaddr <a class="symbol _variable" name="UnknownAddress.sa" href="./htmlsrc/std.socket.html#L555" kind="variable" beg="555" end="555">sa</a>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#UnknownAddress.sa" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L555">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">sockaddr* <a class="symbol _function" name="UnknownAddress.name" href="./htmlsrc/std.socket.html#L558" kind="function" beg="558" end="561">name</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#UnknownAddress.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L558">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="UnknownAddress.nameLen" href="./htmlsrc/std.socket.html#L564" kind="function" beg="564" end="567">nameLen</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#UnknownAddress.nameLen" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L564">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">AddressFamily <a class="symbol _function" name="UnknownAddress.addressFamily" href="./htmlsrc/std.socket.html#L571" kind="function" beg="571" end="574">addressFamily</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#UnknownAddress.addressFamily" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L571">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">string <a class="symbol _function" name="UnknownAddress.toString" href="./htmlsrc/std.socket.html#L577" kind="function" beg="577" end="580">toString</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#UnknownAddress.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L577">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="InternetAddress" href="./htmlsrc/std.socket.html#L588" kind="class" beg="588" end="702">InternetAddress</a> : Address; <a title="Permalink to this symbol" href="#InternetAddress" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L588">#</a></dt>
<dd class="ddef">
<div class="summary">InternetAddress is a class that represents an IPv4 (internet protocol version
 4) address and port.</div>
<dl>
<dt class="decl">sockaddr_in <a class="symbol _variable" name="InternetAddress.sin" href="./htmlsrc/std.socket.html#L591" kind="variable" beg="591" end="591">sin</a>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.sin" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L591">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">sockaddr* <a class="symbol _function" name="InternetAddress.name" href="./htmlsrc/std.socket.html#L594" kind="function" beg="594" end="597">name</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.name" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L594">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="InternetAddress.nameLen" href="./htmlsrc/std.socket.html#L600" kind="function" beg="600" end="603">nameLen</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.nameLen" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L600">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="InternetAddress.this" href="./htmlsrc/std.socket.html#L606" kind="ctor" beg="606" end="608">this</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L606">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="InternetAddress.ADDR_ANY" href="./htmlsrc/std.socket.html#L612" kind="variable" beg="612" end="612">ADDR_ANY</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.ADDR_ANY" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L612">#</a></dt>
<dd class="ddef">
<div class="summary">Any IPv4 address number.</div></dd>
<dt class="decl">uint <a class="symbol _variable" name="InternetAddress.ADDR_NONE" href="./htmlsrc/std.socket.html#L613" kind="variable" beg="613" end="613">ADDR_NONE</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.ADDR_NONE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L613">#</a></dt>
<dd class="ddef">
<div class="summary">An invalid IPv4 address number.</div></dd>
<dt class="decl">ushort <a class="symbol _variable" name="InternetAddress.PORT_ANY" href="./htmlsrc/std.socket.html#L614" kind="variable" beg="614" end="614">PORT_ANY</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.PORT_ANY" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L614">#</a></dt>
<dd class="ddef">
<div class="summary">Any IPv4 port number.</div></dd>
<dt class="decl">AddressFamily <a class="symbol _function" name="InternetAddress.addressFamily" href="./htmlsrc/std.socket.html#L617" kind="function" beg="617" end="620">addressFamily</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.addressFamily" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L617">#</a></dt>
<dd class="ddef">
<div class="summary">Overridden to return AddressFamily.INET.</div></dd>
<dt class="decl">ushort <a class="symbol _function" name="InternetAddress.port" href="./htmlsrc/std.socket.html#L623" kind="function" beg="623" end="626">port</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.port" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L623">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the IPv4 port number.</div></dd>
<dt class="decl">uint <a class="symbol _function" name="InternetAddress.addr" href="./htmlsrc/std.socket.html#L629" kind="function" beg="629" end="632">addr</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.addr" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L629">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the IPv4 address number.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="InternetAddress.this:2" href="./htmlsrc/std.socket.html#L641" kind="ctor" beg="641" end="654">this</a><span class="params">(string <em>addr</em>, ushort <em>port</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L641">#</a></dt>
<dd class="ddef">
<p class="sec_header">Params:</p>
<table class="params">
<tr><td><em>addr</em></td><td>an IPv4 address string in the dotted-decimal form a.b.c.d,
          or a host name that will be resolved using an InternetHost
          object.</td></tr>
<tr><td><em>port</em></td><td>may be PORT_ANY as stated below.</td></tr></table></dd>
<dt class="decl"><a class="symbol _ctor" name="InternetAddress.this:3" href="./htmlsrc/std.socket.html#L661" kind="ctor" beg="661" end="665">this</a><span class="params">(uint <em>addr</em>, ushort <em>port</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.this:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L661">#</a></dt>
<dt class="decl"><a class="symbol _ctor" name="InternetAddress.this:4" href="./htmlsrc/std.socket.html#L668" kind="ctor" beg="668" end="672">this</a><span class="params">(ushort <em>port</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.this:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L668">#</a></dt>
<dd class="ddef">
<div class="summary">Construct a new Address. addr may be ADDR_ANY (default) and port may
 be PORT_ANY, and the actual numbers may not be known until a connection
 is made.</div></dd>
<dt class="decl">string <a class="symbol _function" name="InternetAddress.toAddrString" href="./htmlsrc/std.socket.html#L675" kind="function" beg="675" end="678">toAddrString</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.toAddrString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L675">#</a></dt>
<dd class="ddef">
<div class="summary">Human readable string representing the IPv4 address in dotted-decimal form.</div></dd>
<dt class="decl">string <a class="symbol _function" name="InternetAddress.toPortString" href="./htmlsrc/std.socket.html#L681" kind="function" beg="681" end="684">toPortString</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.toPortString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L681">#</a></dt>
<dd class="ddef">
<div class="summary">Human readable string representing the IPv4 port.</div></dd>
<dt class="decl">string <a class="symbol _function" name="InternetAddress.toString" href="./htmlsrc/std.socket.html#L687" kind="function" beg="687" end="690">toString</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L687">#</a></dt>
<dd class="ddef">
<div class="summary">Human readable string representing the IPv4 address and port in the form <i>a.b.c.d:e</i>.</div></dd>
<dt class="decl">uint <a class="symbol _function" name="InternetAddress.parse" href="./htmlsrc/std.socket.html#L698" kind="function" beg="698" end="701">parse</a><span class="params">(string <em>addr</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#InternetAddress.parse" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L698">#</a></dt>
<dd class="ddef">
<div class="summary">Parse an IPv4 address string in the dotted-decimal form <i>a.b.c.d</i>
 and return the number.
 If the string is not a legitimate IPv4 address,
 ADDR_NONE is returned.</div></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest:4" href="./htmlsrc/std.socket.html#L705" kind="unittest" beg="705" end="709">unittest</a>; <a title="Permalink to this symbol" href="#unittest:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L705">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">class <a class="symbol _class" name="SocketAcceptException" href="./htmlsrc/std.socket.html#L713" kind="class" beg="713" end="719">SocketAcceptException</a> : SocketException; <a title="Permalink to this symbol" href="#SocketAcceptException" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L713">#</a></dt>
<dd class="ddef">
<div class="summary"></div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="SocketAcceptException.this" href="./htmlsrc/std.socket.html#L715" kind="ctor" beg="715" end="718">this</a><span class="params">(string <em>msg</em>, int <em>err</em> = 0)</span>; <a title="Permalink to this symbol" href="#SocketAcceptException.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L715">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="SocketShutdown" href="./htmlsrc/std.socket.html#L722" kind="enum" beg="722" end="727">SocketShutdown</a>; <a title="Permalink to this symbol" href="#SocketShutdown" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L722">#</a></dt>
<dd class="ddef">
<div class="summary">How a socket is shutdown:</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="SocketShutdown.RECEIVE" href="./htmlsrc/std.socket.html#L724" kind="enummem" beg="724" end="724">RECEIVE</a> <a title="Permalink to this symbol" href="#SocketShutdown.RECEIVE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L724">#</a></dt>
<dd class="ddef">
<div class="summary">socket receives are disallowed</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketShutdown.SEND" href="./htmlsrc/std.socket.html#L725" kind="enummem" beg="725" end="725">SEND</a> <a title="Permalink to this symbol" href="#SocketShutdown.SEND" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L725">#</a></dt>
<dd class="ddef">
<div class="summary">socket sends are disallowed</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketShutdown.BOTH" href="./htmlsrc/std.socket.html#L726" kind="enummem" beg="726" end="726">BOTH</a> <a title="Permalink to this symbol" href="#SocketShutdown.BOTH" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L726">#</a></dt>
<dd class="ddef">
<div class="summary">both RECEIVE and SEND</div></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="SocketFlags" href="./htmlsrc/std.socket.html#L731" kind="enum" beg="731" end="739">SocketFlags</a>; <a title="Permalink to this symbol" href="#SocketFlags" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L731">#</a></dt>
<dd class="ddef">
<div class="summary">Flags may be OR'ed together:</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="SocketFlags.NONE" href="./htmlsrc/std.socket.html#L733" kind="enummem" beg="733" end="733">NONE</a> <a title="Permalink to this symbol" href="#SocketFlags.NONE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L733">#</a></dt>
<dd class="ddef">
<div class="summary">no flags specified</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketFlags.OOB" href="./htmlsrc/std.socket.html#L735" kind="enummem" beg="735" end="735">OOB</a> <a title="Permalink to this symbol" href="#SocketFlags.OOB" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L735">#</a></dt>
<dd class="ddef">
<div class="summary">out-of-band stream data</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketFlags.PEEK" href="./htmlsrc/std.socket.html#L736" kind="enummem" beg="736" end="736">PEEK</a> <a title="Permalink to this symbol" href="#SocketFlags.PEEK" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L736">#</a></dt>
<dd class="ddef">
<div class="summary">peek at incoming data without removing it from the queue, only for receiving</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketFlags.DONTROUTE" href="./htmlsrc/std.socket.html#L737" kind="enummem" beg="737" end="737">DONTROUTE</a> <a title="Permalink to this symbol" href="#SocketFlags.DONTROUTE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L737">#</a></dt>
<dd class="ddef">
<div class="summary">data should not be subject to routing; this flag may be ignored. Only for sending</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketFlags.NOSIGNAL" href="./htmlsrc/std.socket.html#L738" kind="enummem" beg="738" end="738">NOSIGNAL</a> <a title="Permalink to this symbol" href="#SocketFlags.NOSIGNAL" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L738">#</a></dt>
<dd class="ddef">
<div class="summary">don't send SIGPIPE signal on socket write error and instead return EPIPE</div></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="timeval" href="./htmlsrc/std.socket.html#L743" kind="struct" beg="743" end="755">timeval</a>; <a title="Permalink to this symbol" href="#timeval" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L743">#</a></dt>
<dd class="ddef">
<div class="summary">Duration timeout value.</div>
<dl>
<dt class="decl">int <a class="symbol _variable" name="timeval.seconds" href="./htmlsrc/std.socket.html#L746" kind="variable" beg="746" end="746">seconds</a>; <a title="Permalink to this symbol" href="#timeval.seconds" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L746">#</a></dt>
<dd class="ddef">
<div class="summary">Number of seconds.</div></dd>
<dt class="decl">int <a class="symbol _variable" name="timeval.microseconds" href="./htmlsrc/std.socket.html#L747" kind="variable" beg="747" end="747">microseconds</a>; <a title="Permalink to this symbol" href="#timeval.microseconds" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L747">#</a></dt>
<dd class="ddef">
<div class="summary">Number of additional microseconds.</div></dd>
<dt class="decl">alias seconds <a class="symbol _alias" name="timeval.tv_sec" href="./htmlsrc/std.socket.html#L752" kind="alias" beg="752" end="752">tv_sec</a>; <span class="attrs">[<span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#timeval.tv_sec" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L752">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">alias microseconds <a class="symbol _alias" name="timeval.tv_usec" href="./htmlsrc/std.socket.html#L753" kind="alias" beg="753" end="753">tv_usec</a>; <span class="attrs">[<span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#timeval.tv_usec" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L753">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="SocketSet" href="./htmlsrc/std.socket.html#L759" kind="class" beg="759" end="890">SocketSet</a>; <a title="Permalink to this symbol" href="#SocketSet" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L759">#</a></dt>
<dd class="ddef">
<div class="summary">A collection of sockets for use with Socket.select.</div>
<dl>
<dt class="decl">uint <a class="symbol _variable" name="SocketSet.maxsockets" href="./htmlsrc/std.socket.html#L762" kind="variable" beg="762" end="762">maxsockets</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.maxsockets" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L762">#</a></dt>
<dd class="ddef">
<div class="summary">max desired sockets, the fd_set might be capable of holding more</div></dd>
<dt class="decl">fd_set <a class="symbol _variable" name="SocketSet.set" href="./htmlsrc/std.socket.html#L763" kind="variable" beg="763" end="763">set</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.set" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L763">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _variable" name="SocketSet.maxfd" href="./htmlsrc/std.socket.html#L775" kind="variable" beg="775" end="775">maxfd</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.maxfd" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L775">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="SocketSet.count" href="./htmlsrc/std.socket.html#L776" kind="variable" beg="776" end="776">count</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.count" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L776">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="SocketSet.this" href="./htmlsrc/std.socket.html#L783" kind="ctor" beg="783" end="787">this</a><span class="params">(uint <em>max</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L783">#</a></dt>
<dd class="ddef">
<div class="summary">Set the maximum amount of sockets that may be added.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="SocketSet.this:2" href="./htmlsrc/std.socket.html#L790" kind="ctor" beg="790" end="793">this</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L790">#</a></dt>
<dd class="ddef">
<div class="summary">Uses the default maximum for the system.</div></dd>
<dt class="decl">void <a class="symbol _function" name="SocketSet.reset" href="./htmlsrc/std.socket.html#L796" kind="function" beg="796" end="805">reset</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.reset" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L796">#</a></dt>
<dd class="ddef">
<div class="summary">Reset the SocketSet so that there are 0 Sockets in the collection.</div></dd>
<dt class="decl">void <a class="symbol _function" name="SocketSet.add" href="./htmlsrc/std.socket.html#L808" kind="function" beg="808" end="828">add</a><span class="params">(socket_t <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.add" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L808">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="SocketSet.add:2" href="./htmlsrc/std.socket.html#L831" kind="function" beg="831" end="834">add</a><span class="params">(Socket <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.add:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L831">#</a></dt>
<dd class="ddef">
<div class="summary">Add a Socket to the collection. Adding more than the maximum has dangerous side affects.</div></dd>
<dt class="decl">void <a class="symbol _function" name="SocketSet.remove" href="./htmlsrc/std.socket.html#L836" kind="function" beg="836" end="844">remove</a><span class="params">(socket_t <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.remove" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L836">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="SocketSet.remove:2" href="./htmlsrc/std.socket.html#L848" kind="function" beg="848" end="851">remove</a><span class="params">(Socket <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.remove:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L848">#</a></dt>
<dd class="ddef">
<div class="summary">Remove this Socket from the collection.</div></dd>
<dt class="decl">int <a class="symbol _function" name="SocketSet.isSet" href="./htmlsrc/std.socket.html#L853" kind="function" beg="853" end="856">isSet</a><span class="params">(socket_t <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.isSet" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L853">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="SocketSet.isSet:2" href="./htmlsrc/std.socket.html#L860" kind="function" beg="860" end="863">isSet</a><span class="params">(Socket <em>s</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.isSet:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L860">#</a></dt>
<dd class="ddef">
<div class="summary">Returns nonzero if this Socket is in the collection.</div></dd>
<dt class="decl">uint <a class="symbol _function" name="SocketSet.max" href="./htmlsrc/std.socket.html#L867" kind="function" beg="867" end="870">max</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.max" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L867">#</a></dt>
<dd class="ddef">
<div class="summary">Return maximum amount of sockets that can be added, like FD_SETSIZE.</div></dd>
<dt class="decl">fd_set* <a class="symbol _function" name="SocketSet.toFd_set" href="./htmlsrc/std.socket.html#L873" kind="function" beg="873" end="876">toFd_set</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.toFd_set" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L873">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int <a class="symbol _function" name="SocketSet.selectn" href="./htmlsrc/std.socket.html#L879" kind="function" beg="879" end="889">selectn</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#SocketSet.selectn" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L879">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="SocketOptionLevel" href="./htmlsrc/std.socket.html#L894" kind="enum" beg="894" end="906">SocketOptionLevel</a>; <a title="Permalink to this symbol" href="#SocketOptionLevel" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L894">#</a></dt>
<dd class="ddef">
<div class="summary">The level at which a socket option is defined:</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.SOCKET" href="./htmlsrc/std.socket.html#L896" kind="enummem" beg="896" end="896">SOCKET</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.SOCKET" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L896">#</a></dt>
<dd class="ddef">
<div class="summary">socket level</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.IP" href="./htmlsrc/std.socket.html#L897" kind="enummem" beg="897" end="897">IP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.IP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L897">#</a></dt>
<dd class="ddef">
<div class="summary">internet protocol version 4 level</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.ICMP" href="./htmlsrc/std.socket.html#L898" kind="enummem" beg="898" end="898">ICMP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.ICMP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L898">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.IGMP" href="./htmlsrc/std.socket.html#L899" kind="enummem" beg="899" end="899">IGMP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.IGMP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L899">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.GGP" href="./htmlsrc/std.socket.html#L900" kind="enummem" beg="900" end="900">GGP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.GGP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L900">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.TCP" href="./htmlsrc/std.socket.html#L901" kind="enummem" beg="901" end="901">TCP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.TCP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L901">#</a></dt>
<dd class="ddef">
<div class="summary">transmission control protocol level</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.PUP" href="./htmlsrc/std.socket.html#L902" kind="enummem" beg="902" end="902">PUP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.PUP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L902">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.UDP" href="./htmlsrc/std.socket.html#L903" kind="enummem" beg="903" end="903">UDP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.UDP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L903">#</a></dt>
<dd class="ddef">
<div class="summary">user datagram protocol level</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.IDP" href="./htmlsrc/std.socket.html#L904" kind="enummem" beg="904" end="904">IDP</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.IDP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L904">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOptionLevel.IPV6" href="./htmlsrc/std.socket.html#L905" kind="enummem" beg="905" end="905">IPV6</a> <a title="Permalink to this symbol" href="#SocketOptionLevel.IPV6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L905">#</a></dt>
<dd class="ddef">
<div class="summary">internet protocol version 6 level</div></dd></dl></dd>
<dt class="decl">struct <a class="symbol _struct" name="linger" href="./htmlsrc/std.socket.html#L909" kind="struct" beg="909" end="929">linger</a>; <a title="Permalink to this symbol" href="#linger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L909">#</a></dt>
<dd class="ddef">
<div class="summary">Linger information for use with SocketOption.LINGER.</div>
<dl>
<dt class="decl">int32_t <a class="symbol _variable" name="linger.on" href="./htmlsrc/std.socket.html#L919" kind="variable" beg="919" end="919">on</a>; <a title="Permalink to this symbol" href="#linger.on" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L919">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">int32_t <a class="symbol _variable" name="linger.time" href="./htmlsrc/std.socket.html#L920" kind="variable" beg="920" end="920">time</a>; <a title="Permalink to this symbol" href="#linger.time" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L920">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">alias on <a class="symbol _alias" name="linger.l_onoff" href="./htmlsrc/std.socket.html#L926" kind="alias" beg="926" end="926">l_onoff</a>; <span class="attrs">[<span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#linger.l_onoff" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L926">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">alias time <a class="symbol _alias" name="linger.l_linger" href="./htmlsrc/std.socket.html#L927" kind="alias" beg="927" end="927">l_linger</a>; <span class="attrs">[<span class="stc">deprecated</span>]</span> <a title="Permalink to this symbol" href="#linger.l_linger" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L927">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">enum <a class="symbol _enum" name="SocketOption" href="./htmlsrc/std.socket.html#L933" kind="enum" beg="933" end="953">SocketOption</a>; <a title="Permalink to this symbol" href="#SocketOption" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L933">#</a></dt>
<dd class="ddef">
<div class="summary">Specifies a socket option:</div>
<dl>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.DEBUG" href="./htmlsrc/std.socket.html#L935" kind="enummem" beg="935" end="935">DEBUG</a> <a title="Permalink to this symbol" href="#SocketOption.DEBUG" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L935">#</a></dt>
<dd class="ddef">
<div class="summary">record debugging information</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.BROADCAST" href="./htmlsrc/std.socket.html#L936" kind="enummem" beg="936" end="936">BROADCAST</a> <a title="Permalink to this symbol" href="#SocketOption.BROADCAST" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L936">#</a></dt>
<dd class="ddef">
<div class="summary">allow transmission of broadcast messages</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.REUSEADDR" href="./htmlsrc/std.socket.html#L937" kind="enummem" beg="937" end="937">REUSEADDR</a> <a title="Permalink to this symbol" href="#SocketOption.REUSEADDR" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L937">#</a></dt>
<dd class="ddef">
<div class="summary">allow local reuse of address</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.LINGER" href="./htmlsrc/std.socket.html#L938" kind="enummem" beg="938" end="938">LINGER</a> <a title="Permalink to this symbol" href="#SocketOption.LINGER" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L938">#</a></dt>
<dd class="ddef">
<div class="summary">linger on close if unsent data is present</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.OOBINLINE" href="./htmlsrc/std.socket.html#L939" kind="enummem" beg="939" end="939">OOBINLINE</a> <a title="Permalink to this symbol" href="#SocketOption.OOBINLINE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L939">#</a></dt>
<dd class="ddef">
<div class="summary">receive out-of-band data in band</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.SNDBUF" href="./htmlsrc/std.socket.html#L940" kind="enummem" beg="940" end="940">SNDBUF</a> <a title="Permalink to this symbol" href="#SocketOption.SNDBUF" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L940">#</a></dt>
<dd class="ddef">
<div class="summary">send buffer size</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.RCVBUF" href="./htmlsrc/std.socket.html#L941" kind="enummem" beg="941" end="941">RCVBUF</a> <a title="Permalink to this symbol" href="#SocketOption.RCVBUF" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L941">#</a></dt>
<dd class="ddef">
<div class="summary">receive buffer size</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.DONTROUTE" href="./htmlsrc/std.socket.html#L942" kind="enummem" beg="942" end="942">DONTROUTE</a> <a title="Permalink to this symbol" href="#SocketOption.DONTROUTE" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L942">#</a></dt>
<dd class="ddef">
<div class="summary">do not route</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.TCP_NODELAY" href="./htmlsrc/std.socket.html#L945" kind="enummem" beg="945" end="945">TCP_NODELAY</a> <a title="Permalink to this symbol" href="#SocketOption.TCP_NODELAY" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L945">#</a></dt>
<dd class="ddef">
<div class="summary">disable the Nagle algorithm for send coalescing</div></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.IPV6_UNICAST_HOPS" href="./htmlsrc/std.socket.html#L948" kind="enummem" beg="948" end="948">IPV6_UNICAST_HOPS</a> <a title="Permalink to this symbol" href="#SocketOption.IPV6_UNICAST_HOPS" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L948">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.IPV6_MULTICAST_IF" href="./htmlsrc/std.socket.html#L949" kind="enummem" beg="949" end="949">IPV6_MULTICAST_IF</a> <a title="Permalink to this symbol" href="#SocketOption.IPV6_MULTICAST_IF" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L949">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.IPV6_MULTICAST_LOOP" href="./htmlsrc/std.socket.html#L950" kind="enummem" beg="950" end="950">IPV6_MULTICAST_LOOP</a> <a title="Permalink to this symbol" href="#SocketOption.IPV6_MULTICAST_LOOP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L950">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.IPV6_JOIN_GROUP" href="./htmlsrc/std.socket.html#L951" kind="enummem" beg="951" end="951">IPV6_JOIN_GROUP</a> <a title="Permalink to this symbol" href="#SocketOption.IPV6_JOIN_GROUP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L951">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _enummem" name="SocketOption.IPV6_LEAVE_GROUP" href="./htmlsrc/std.socket.html#L952" kind="enummem" beg="952" end="952">IPV6_LEAVE_GROUP</a> <a title="Permalink to this symbol" href="#SocketOption.IPV6_LEAVE_GROUP" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L952">#</a></dt>
<dd class="ddef"></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="Socket" href="./htmlsrc/std.socket.html#L960" kind="class" beg="960" end="1560">Socket</a>; <a title="Permalink to this symbol" href="#Socket" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L960">#</a></dt>
<dd class="ddef">
<div class="summary">Socket is a class that creates a network communication endpoint using the
 Berkeley sockets interface.</div>
<dl>
<dt class="decl">socket_t <a class="symbol _variable" name="Socket.sock" href="./htmlsrc/std.socket.html#L963" kind="variable" beg="963" end="963">sock</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#Socket.sock" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L963">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">AddressFamily <a class="symbol _variable" name="Socket._family" href="./htmlsrc/std.socket.html#L964" kind="variable" beg="964" end="964">_family</a>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#Socket._family" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L964">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="Socket.this" href="./htmlsrc/std.socket.html#L971" kind="ctor" beg="971" end="973">this</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#Socket.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L971">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="Socket.this:2" href="./htmlsrc/std.socket.html#L983" kind="ctor" beg="983" end="989">this</a><span class="params">(AddressFamily <em>af</em>, SocketType <em>type</em>, ProtocolType <em>protocol</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L983">#</a></dt>
<dt class="decl"><a class="symbol _ctor" name="Socket.this:3" href="./htmlsrc/std.socket.html#L995" kind="ctor" beg="995" end="998">this</a><span class="params">(AddressFamily <em>af</em>, SocketType <em>type</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.this:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L995">#</a></dt>
<dt class="decl"><a class="symbol _ctor" name="Socket.this:4" href="./htmlsrc/std.socket.html#L1002" kind="ctor" beg="1002" end="1009">this</a><span class="params">(AddressFamily <em>af</em>, SocketType <em>type</em>, string <em>protocolName</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.this:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1002">#</a></dt>
<dd class="ddef">
<div class="summary">Create a blocking socket. If a single protocol type exists to support
 this socket type within the address family, the ProtocolType may be
 omitted.</div></dd>
<dt class="decl"><a class="symbol _dtor" name="Socket.~this" href="./htmlsrc/std.socket.html#L1012" kind="dtor" beg="1012" end="1015">~this</a>(); <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.~this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1012">#</a></dt>

<dt class="decl">socket_t <a class="symbol _function" name="Socket.handle" href="./htmlsrc/std.socket.html#L1019" kind="function" beg="1019" end="1022">handle</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.handle" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1019">#</a></dt>
<dd class="ddef">
<div class="summary">Get underlying socket handle.</div></dd>
<dt class="decl">bool <a class="symbol _function" name="Socket.blocking" href="./htmlsrc/std.socket.html#L1031" kind="function" beg="1031" end="1041">blocking</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.blocking" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1031">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="Socket.blocking:2" href="./htmlsrc/std.socket.html#L1044" kind="function" beg="1044" end="1069">blocking</a><span class="params">(bool <em>byes</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.blocking:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1044">#</a></dt>
<dd class="ddef">
<div class="summary">Get/set socket's blocking flag.</div>
When a socket is blocking, calls to receive(), accept(), and send()
 will block and wait for data/action.
 A non-blocking socket will immediately return instead of blocking.</dd>
<dt class="decl">AddressFamily <a class="symbol _function" name="Socket.addressFamily" href="./htmlsrc/std.socket.html#L1073" kind="function" beg="1073" end="1076">addressFamily</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.addressFamily" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1073">#</a></dt>
<dd class="ddef">
<div class="summary">Get the socket's address family.</div></dd>
<dt class="decl">bool <a class="symbol _function" name="Socket.isAlive" href="./htmlsrc/std.socket.html#L1079" kind="function" beg="1079" end="1083">isAlive</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.isAlive" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1079">#</a></dt>
<dd class="ddef">
<div class="summary">Property that indicates if this is a valid, alive socket.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.bind" href="./htmlsrc/std.socket.html#L1086" kind="function" beg="1086" end="1090">bind</a><span class="params">(Address <em>addr</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.bind" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1086">#</a></dt>
<dd class="ddef">
<div class="summary">Associate a local address with this socket.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.connect" href="./htmlsrc/std.socket.html#L1097" kind="function" beg="1097" end="1123">connect</a><span class="params">(Address <em>to</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.connect" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1097">#</a></dt>
<dd class="ddef">
<div class="summary">Establish a connection. If the socket is blocking, connect waits for
 the connection to be made. If the socket is nonblocking, connect
 returns immediately and the connection attempt is still in progress.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.listen" href="./htmlsrc/std.socket.html#L1130" kind="function" beg="1130" end="1134">listen</a><span class="params">(int <em>backlog</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.listen" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1130">#</a></dt>
<dd class="ddef">
<div class="summary">Listen for an incoming connection. bind must be called before you can
 listen. The backlog is a request of how many pending incoming
 connections are queued until accept'ed.</div></dd>
<dt class="decl">Socket <a class="symbol _function" name="Socket.accepting" href="./htmlsrc/std.socket.html#L1144" kind="function" beg="1144" end="1147">accepting</a><span class="params">()</span>; <span class="attrs">[<span class="prot">protected</span>]</span> <a title="Permalink to this symbol" href="#Socket.accepting" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1144">#</a></dt>
<dd class="ddef">
<div class="summary">Called by accept when a new Socket must be created for a new
 connection. To use a derived class, override this method and return an
 instance of your class. The returned Socket's handle must not be set;
 Socket has a protected constructor this() to use in this situation.</div></dd>
<dt class="decl">Socket <a class="symbol _function" name="Socket.accept" href="./htmlsrc/std.socket.html#L1154" kind="function" beg="1154" end="1181">accept</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.accept" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1154">#</a></dt>
<dd class="ddef">
<div class="summary">Accept an incoming connection. If the socket is blocking, accept
 waits for a connection request. Throws SocketAcceptException if unable
 to accept. See accepting for use with derived classes.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.shutdown" href="./htmlsrc/std.socket.html#L1184" kind="function" beg="1184" end="1187">shutdown</a><span class="params">(SocketShutdown <em>how</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.shutdown" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1184">#</a></dt>
<dd class="ddef">
<div class="summary">Disables sends and/or receives.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket._close" href="./htmlsrc/std.socket.html#L1190" kind="function" beg="1190" end="1200">_close</a><span class="params">(socket_t <em>sock</em>)</span>; <span class="attrs">[<span class="prot">private</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Socket._close" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1190">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.close" href="./htmlsrc/std.socket.html#L1210" kind="function" beg="1210" end="1214">close</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.close" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1210">#</a></dt>
<dd class="ddef">
<div class="summary">Immediately drop any connections and release socket resources.
 Calling shutdown before close is recommended for connection-oriented
 sockets. The Socket object is no longer usable after close.</div></dd>
<dt class="decl">Address <a class="symbol _function" name="Socket.newFamilyObject" href="./htmlsrc/std.socket.html#L1217" kind="function" beg="1217" end="1230">newFamilyObject</a><span class="params">()</span>; <span class="attrs">[<span class="prot">private</span>]</span> <a title="Permalink to this symbol" href="#Socket.newFamilyObject" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1217">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">string <a class="symbol _function" name="Socket.hostName" href="./htmlsrc/std.socket.html#L1234" kind="function" beg="1234" end="1240">hostName</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Socket.hostName" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1234">#</a></dt>
<dd class="ddef">
<div class="summary">Returns the local machine's host name. Idea from mango.</div></dd>
<dt class="decl">Address <a class="symbol _function" name="Socket.remoteAddress" href="./htmlsrc/std.socket.html#L1243" kind="function" beg="1243" end="1251">remoteAddress</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.remoteAddress" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1243">#</a></dt>
<dd class="ddef">
<div class="summary">Remote endpoint Address.</div></dd>
<dt class="decl">Address <a class="symbol _function" name="Socket.localAddress" href="./htmlsrc/std.socket.html#L1254" kind="function" beg="1254" end="1262">localAddress</a><span class="params">()</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.localAddress" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1254">#</a></dt>
<dd class="ddef">
<div class="summary">Local endpoint Address.</div></dd>
<dt class="decl">int <a class="symbol _variable" name="Socket.ERROR" href="./htmlsrc/std.socket.html#L1265" kind="variable" beg="1265" end="1265">ERROR</a>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">const</span>]</span> <a title="Permalink to this symbol" href="#Socket.ERROR" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1265">#</a></dt>
<dd class="ddef">
<div class="summary">Send or receive error code.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.send" href="./htmlsrc/std.socket.html#L1273" kind="function" beg="1273" end="1278">send</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.send" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1273">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.send:2" href="./htmlsrc/std.socket.html#L1281" kind="function" beg="1281" end="1284">send</a><span class="params">(void[] <em>buf</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.send:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1281">#</a></dt>
<dd class="ddef">
<div class="summary">Send data on the connection. Returns the number of bytes actually
 sent, or ERROR on failure. If the socket is blocking and there is no
 buffer space left, send waits.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.sendTo" href="./htmlsrc/std.socket.html#L1289" kind="function" beg="1289" end="1294">sendTo</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>, Address <em>to</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.sendTo" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1289">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.sendTo:2" href="./htmlsrc/std.socket.html#L1297" kind="function" beg="1297" end="1300">sendTo</a><span class="params">(void[] <em>buf</em>, Address <em>to</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.sendTo:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1297">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.sendTo:3" href="./htmlsrc/std.socket.html#L1305" kind="function" beg="1305" end="1310">sendTo</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.sendTo:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1305">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.sendTo:4" href="./htmlsrc/std.socket.html#L1315" kind="function" beg="1315" end="1318">sendTo</a><span class="params">(void[] <em>buf</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.sendTo:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1315">#</a></dt>
<dd class="ddef">
<div class="summary">Send data to a specific destination Address. If the destination address is not specified, a connection must have been made and that address is used. If the socket is blocking and there is no buffer space left, sendTo waits.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.receive" href="./htmlsrc/std.socket.html#L1328" kind="function" beg="1328" end="1335">receive</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receive" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1328">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.receive:2" href="./htmlsrc/std.socket.html#L1338" kind="function" beg="1338" end="1341">receive</a><span class="params">(void[] <em>buf</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receive:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1338">#</a></dt>
<dd class="ddef">
<div class="summary">Receive data on the connection. Returns the number of bytes actually
 received, 0 if the remote side has closed the connection, or ERROR on
 failure. If the socket is blocking, receive waits until there is data
 to be received.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.receiveFrom" href="./htmlsrc/std.socket.html#L1350" kind="function" beg="1350" end="1360">receiveFrom</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>, out Address <em>from</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receiveFrom" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1350">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.receiveFrom:2" href="./htmlsrc/std.socket.html#L1364" kind="function" beg="1364" end="1367">receiveFrom</a><span class="params">(void[] <em>buf</em>, out Address <em>from</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receiveFrom:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1364">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.receiveFrom:3" href="./htmlsrc/std.socket.html#L1372" kind="function" beg="1372" end="1379">receiveFrom</a><span class="params">(void[] <em>buf</em>, SocketFlags <em>flags</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receiveFrom:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1372">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.receiveFrom:4" href="./htmlsrc/std.socket.html#L1384" kind="function" beg="1384" end="1387">receiveFrom</a><span class="params">(void[] <em>buf</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.receiveFrom:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1384">#</a></dt>
<dd class="ddef">
<div class="summary">Receive data and get the remote endpoint Address.
 If the socket is blocking, receiveFrom waits until there is data to
 be received.</div>
<p class="sec_header">Returns:</p>the number of bytes actually received,
 0 if the remote side has closed the connection, or ERROR on failure.</dd>
<dt class="decl">int <a class="symbol _function" name="Socket.getOption" href="./htmlsrc/std.socket.html#L1392" kind="function" beg="1392" end="1398">getOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, void[] <em>result</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.getOption" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1392">#</a></dt>
<dd class="ddef">
<div class="summary">Get a socket option. Returns the number of bytes written to result.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.getOption:2" href="./htmlsrc/std.socket.html#L1402" kind="function" beg="1402" end="1405">getOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, out int32_t <em>result</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.getOption:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1402">#</a></dt>
<dd class="ddef">
<div class="summary">Common case of getting integer and boolean options.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.getOption:3" href="./htmlsrc/std.socket.html#L1409" kind="function" beg="1409" end="1413">getOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, out linger <em>result</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.getOption:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1409">#</a></dt>
<dd class="ddef">
<div class="summary">Get the linger option.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.setOption" href="./htmlsrc/std.socket.html#L1416" kind="function" beg="1416" end="1420">setOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, void[] <em>value</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.setOption" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1416">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.setOption:2" href="./htmlsrc/std.socket.html#L1424" kind="function" beg="1424" end="1427">setOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, int32_t <em>value</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.setOption:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1424">#</a></dt>
<dd class="ddef">
<div class="summary">Common case for setting integer and boolean options.</div></dd>
<dt class="decl">void <a class="symbol _function" name="Socket.setOption:3" href="./htmlsrc/std.socket.html#L1431" kind="function" beg="1431" end="1435">setOption</a><span class="params">(SocketOptionLevel <em>level</em>, SocketOption <em>option</em>, linger <em>value</em>)</span>; <span class="attrs">[<span class="prot">public</span>]</span> <a title="Permalink to this symbol" href="#Socket.setOption:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1431">#</a></dt>
<dd class="ddef">
<div class="summary">Set the linger option.</div></dd>
<dt class="decl">int <a class="symbol _function" name="Socket.select" href="./htmlsrc/std.socket.html#L1446" kind="function" beg="1446" end="1532">select</a><span class="params">(SocketSet <em>checkRead</em>, SocketSet <em>checkWrite</em>, SocketSet <em>checkError</em>, timeval* <em>tv</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Socket.select" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1446">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.select:2" href="./htmlsrc/std.socket.html#L1536" kind="function" beg="1536" end="1542">select</a><span class="params">(SocketSet <em>checkRead</em>, SocketSet <em>checkWrite</em>, SocketSet <em>checkError</em>, int <em>microseconds</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Socket.select:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1536">#</a></dt>
<dt class="decl">int <a class="symbol _function" name="Socket.select:3" href="./htmlsrc/std.socket.html#L1547" kind="function" beg="1547" end="1550">select</a><span class="params">(SocketSet <em>checkRead</em>, SocketSet <em>checkWrite</em>, SocketSet <em>checkError</em>)</span>; <span class="attrs">[<span class="prot">public</span>, <span class="stc">static</span>]</span> <a title="Permalink to this symbol" href="#Socket.select:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1547">#</a></dt>
<dd class="ddef">
<div class="summary">Wait for a socket to change status. A wait timeout timeval or int microseconds may be specified; if a timeout is not specified or the timeval is null, the maximum timeout is used. The timeval timeout has an unspecified value when select returns. Returns the number of sockets with status changes, 0 on timeout, or -1 on interruption. If the return value is greater than 0, the SocketSets are updated to only contain the sockets having status changes. For a connecting socket, a write status change means the connection is established and it's able to send. For a listening socket, a read status change means there is an incoming connection request and it's able to accept.</div></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="TcpSocket" href="./htmlsrc/std.socket.html#L1564" kind="class" beg="1564" end="1586">TcpSocket</a> : Socket; <a title="Permalink to this symbol" href="#TcpSocket" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1564">#</a></dt>
<dd class="ddef">
<div class="summary">TcpSocket is a shortcut class for a TCP Socket.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="TcpSocket.this" href="./htmlsrc/std.socket.html#L1567" kind="ctor" beg="1567" end="1570">this</a><span class="params">(AddressFamily <em>family</em>)</span>; <a title="Permalink to this symbol" href="#TcpSocket.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1567">#</a></dt>
<dd class="ddef">
<div class="summary">Constructs a blocking TCP Socket.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="TcpSocket.this:2" href="./htmlsrc/std.socket.html#L1573" kind="ctor" beg="1573" end="1576">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#TcpSocket.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1573">#</a></dt>
<dd class="ddef">
<div class="summary">Constructs a blocking TCP Socket.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="TcpSocket.this:3" href="./htmlsrc/std.socket.html#L1581" kind="ctor" beg="1581" end="1585">this</a><span class="params">(Address <em>connectTo</em>)</span>; <a title="Permalink to this symbol" href="#TcpSocket.this:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1581">#</a></dt>
<dd class="ddef">
<div class="summary">Constructs a blocking TCP Socket and connects to an InternetAddress.</div></dd></dl></dd>
<dt class="decl">class <a class="symbol _class" name="UdpSocket" href="./htmlsrc/std.socket.html#L1590" kind="class" beg="1590" end="1604">UdpSocket</a> : Socket; <a title="Permalink to this symbol" href="#UdpSocket" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1590">#</a></dt>
<dd class="ddef">
<div class="summary">UdpSocket is a shortcut class for a UDP Socket.</div>
<dl>
<dt class="decl"><a class="symbol _ctor" name="UdpSocket.this" href="./htmlsrc/std.socket.html#L1593" kind="ctor" beg="1593" end="1596">this</a><span class="params">(AddressFamily <em>family</em>)</span>; <a title="Permalink to this symbol" href="#UdpSocket.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1593">#</a></dt>
<dd class="ddef">
<div class="summary">Constructs a blocking UDP Socket.</div></dd>
<dt class="decl"><a class="symbol _ctor" name="UdpSocket.this:2" href="./htmlsrc/std.socket.html#L1600" kind="ctor" beg="1600" end="1603">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#UdpSocket.this:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.socket.html#L1600">#</a></dt>
<dd class="ddef">
<div class="summary">Constructs a blocking UDP Socket.</div></dd></dl></dd></dl>
</div>
<div id="footer">
  <p>Copyright © 1999-2008 by Digital Mars ®, All Rights Reserved.</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Fri Dec 26 03:40:10 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>